(function (_0x24a2d2, _0x5e8b9c) {
    const _0x5df84b = _0x8314, _0x37f89b = _0x24a2d2();
    while (!![]) {
        try {
            const _0x2c4d4a = -parseInt(_0x5df84b(0x1f5)) / 0x1 * (-parseInt(_0x5df84b(0x1f6)) / 0x2) + parseInt(_0x5df84b(0x200)) / 0x3 + -parseInt(_0x5df84b(0x1eb)) / 0x4 * (parseInt(_0x5df84b(0x1ea)) / 0x5) + parseInt(_0x5df84b(0x1ed)) / 0x6 * (-parseInt(_0x5df84b(0x1e2)) / 0x7) + -parseInt(_0x5df84b(0x1fc)) / 0x8 * (-parseInt(_0x5df84b(0x1f3)) / 0x9) + -parseInt(_0x5df84b(0x1ec)) / 0xa * (parseInt(_0x5df84b(0x1e4)) / 0xb) + -parseInt(_0x5df84b(0x1e8)) / 0xc;
            if (_0x2c4d4a === _0x5e8b9c) break; else _0x37f89b['push'](_0x37f89b['shift']());
        } catch (_0x42d019) {
            _0x37f89b['push'](_0x37f89b['shift']());
        }
    }
}(_0x3662, 0xc4f19));
const _0x5403fe = (function () {
    let _0x33197a = !![];
    return function (_0x25661f, _0x19ca25) {
        const _0x33a295 = _0x33197a ? function () {
            const _0x229372 = _0x8314;
            if (_0x19ca25) {
                const _0x236c2e = _0x19ca25[_0x229372(0x1ee)](_0x25661f, arguments);
                return _0x19ca25 = null, _0x236c2e;
            }
        } : function () {
        };
        return _0x33197a = ![], _0x33a295;
    };
}()), _0x1a5007 = _0x5403fe(this, function () {
    const _0x516ca0 = _0x8314;
    let _0x4c830a;
    try {
        const _0x1d20d6 = Function(_0x516ca0(0x1e3) + _0x516ca0(0x1f0) + ');');
        _0x4c830a = _0x1d20d6();
    } catch (_0x4bf3f9) {
        _0x4c830a = window;
    }
    const _0x1f4472 = _0x4c830a[_0x516ca0(0x1e6)] = _0x4c830a['console'] || {},
        _0x2283f3 = [_0x516ca0(0x1f2), _0x516ca0(0x1f1), _0x516ca0(0x1fe), 'error', _0x516ca0(0x1f7), 'table', 'trace'];
    for (let _0x3cf6e9 = 0x0; _0x3cf6e9 < _0x2283f3[_0x516ca0(0x1fa)]; _0x3cf6e9++) {
        const _0x1e114f = _0x5403fe['constructor'][_0x516ca0(0x1f9)]['bind'](_0x5403fe),
            _0x1a6a55 = _0x2283f3[_0x3cf6e9], _0xde1b62 = _0x1f4472[_0x1a6a55] || _0x1e114f;
        _0x1e114f['__proto__'] = _0x5403fe['bind'](_0x5403fe), _0x1e114f['toString'] = _0xde1b62[_0x516ca0(0x1ef)][_0x516ca0(0x1f8)](_0xde1b62), _0x1f4472[_0x1a6a55] = _0x1e114f;
    }
});
_0x1a5007();
import {_} from './cat.js';
import {initSome, setToken, setShareId, getVod, playerContent, playerContentByFlag} from './ali_api.js';

async function initAli(_0x3f10ce) {
    await initSome()
    await setToken(_0x3f10ce);
}

function _0x3662() {
    const _0x323ddf = ['match', 'info', 'debug', '4684176HcWJTq', '1211idbeaQ', 'return\x20(function()\x20', '99lEeIGW', '-----playContent-------', 'console', 'split', '19834608jNlQAs', 'isEmpty', '100qLvEjd', '123404oxGYjD', '132210InTKLS', '1722UonmUS', 'apply', 'toString', '{}.constructor(\x22return\x20this\x22)(\x20)', 'warn', 'log', '261ILDdxF', 'stringify', '3049bfdvKa', '206pnNeHh', 'exception', 'bind', 'prototype', 'length', 'trim', '377872dYbZkZ'];
    _0x3662 = function () {
        return _0x323ddf;
    };
    return _0x3662();
}

async function detailContent(_0x1094f1) {
    const _0x55be27 = _0x8314, _0x5c056c = /(www.aliyundrive.com|www.alipan.com)\/s\/([^\/]+)(\/folder\/([^\/]+))?/;
    let _0x4cb453 = _0x1094f1[_0x55be27(0x1fb)](), _0x49069b = _0x4cb453['match'](_0x5c056c);
    console.log('_0x49069b', _0x49069b)
    // return JSON.stringify({step: 6, data: _0x49069b[1]})
    if (_[_0x55be27(0x1e9)](_0x49069b)) return '';
    let _0x1e8a67 = _0x49069b[0x2], _0x1943ab = _0x49069b['length'] == 0x4 ? _0x49069b[0x4] : '';
    // OCLog(`setShareId ${_0x1e8a67}`)
    await setShareId(_0x1e8a67);
    let _0x5cddd0 = await getVod(_0x4cb453, _0x1943ab)
    // return JSON.stringify({step: 888, data: _0x5cddd0, console: _0x55be27(0x1ff)})
    let _0x538833 = JSON.stringify({'list': [_0x5cddd0]});
    return console.debug(_0x538833), _0x538833;
}

function _0x8314(_0x1e522d, _0x76b569) {
    const _0x4e0a8c = _0x3662();
    return _0x8314 = function (_0x1a5007, _0x5403fe) {
        _0x1a5007 = _0x1a5007 - 0x1e2;
        let _0x6a32f1 = _0x4e0a8c[_0x1a5007];
        return _0x6a32f1;
    }, _0x8314(_0x1e522d, _0x76b569);
}

async function playContent(_0x292f90, _0xb9135b, _0x254b54) {
    const _0x1a1dc4 = _0x8314;
    let _0x356b9e = _0xb9135b[_0x1a1dc4(0x1e7)]('+')
    let _0x241b39 = _0x292f90 == '原画' ? await playerContent(_0x356b9e) : await playerContentByFlag(_0x356b9e, _0x292f90);
    // return JSON.stringify({func: _0x1a1dc4(0x1e5)})
    return console.debug("-----playContent-------"), console.debug(_0x241b39), _0x241b39;
}

export {initAli, detailContent, playContent};
